<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>个人资料</title>
	<link rel="stylesheet" type="text/css" href="<?=base_url()?>public/css/style.css">
	<script type="text/javascript" src="<?=base_url()?>public/js/jq.1.12.4.js"></script>
	<script type="text/javascript" src="<?=base_url()?>public/js/js.js"></script>
    
<style>
	.person p span{
		width:22% !important;
	}
</style>
</head>
<body>
	<!-- 头部 -->
	<?php echo $menu  ?>
	<!-- 主体 -->
	<div class="main clearfix">
		<?php echo $left ?>
		<div class="content">
			<div class="con">
				<div class="bikuang">
                	<div class="right_title">
                		<span>公益个人中心&nbsp;&nbsp; -</span>
                		<span style="color:#1d3e00; margin:0;">&nbsp;&nbsp;个人资料</span>
                	</div>      
					<div class="person">
						<?php echo form_open('userinfo/info_post', array('id' => 'myform')); ?>
                    	<p><span>公益账号</span>*<input readonly="readonly" type="text" value="<?=$user['user_account'] ?>"><b></b></p>
                        <p><span>公益推广人</span>*<input readonly="readonly" type="text" value="<?=$user['up_account']?>"><b></b></p>
                        <p><span>姓名</span>*<input type="text" readonly="readonly" id="user_name" name="user_name" value="<?=$user['user_name']?>"><b></b></p>
                        <p><span>手机号码</span>*<input type="text" readonly="readonly" id="mobile" name="mobile" value="<?=$user['mobile']?>"><b></b></p>
                        <p><span>支付宝</span>*<input type="text" readonly="readonly" id="zfb_account" name="zfb_account" value="<?=$user['zfb_account']?>"><b></b></p>
                        <p><span>开户行</span>&nbsp;<input type="text" id="bank_name" name="bank_name" value="<?=$user['bank_name']?>"><b></b></p>
                        <p><span>银行卡号</span>&nbsp;<input type="text" id="bank_card" name="bank_card" value="<?=$user['bank_card']?>"><b></b></p>
                        <p><span>微信号</span>&nbsp;<input type="text" id="wx_id" name="wx_id" value="<?=$user['wx_id']?>"><b></b></p>
                        <p class="mima"><span>二级密码</span>&nbsp;<input type="password" id="spwd" name="spwd" value=""><b style='color:red;'></b></p>
                        <p id="btn_update" class="btn"><input style="width:30%; background:#254e01; color:white; margin-left:40%; margin-top:40px; margin-left:40%;" type="button" value="确认提交" id='bnt-js'></p>
                    </div>
				</div>
			</div>
		</div>
	</div>
	
</body>
</html>

<script type="text/javascript">
$('#bnt-js').on('mousedown',function(){
		$('#bnt-js').css('margin-top','45px');
		console.log(1)
	})
	$('#bnt-js').on('mouseup',function(){
		$('#bnt-js').css('margin-top','40px');
		console.log(2)
	})
$('.js-tishi').on('click',function(){
		$('.js-tishi').css('display','none');
	})
$('#btn_update').on('click', function(event) {
	if($('#user').val() == ''){
		$('#user~b').text('请输入姓名');
		//alert('请输入姓名');
		return false;
	}else{
		$('#user~b').text('');
	}

	var reg = /^\d{11}$/;
	if(!reg.test($('#mobile').val())){
		$('.js-tishi').css('display','block');
	   $('.js-tishi').text('请输入正确的手机号');
		//alert('请输入正确的手机号');
		return false;
	}


	if($('#zfb_account').val() == ''){
		$('.js-tishi').css('display','block');
	   $('.js-tishi').text('请输入支付宝账号');
		//alert('请输入支付宝账号');
		return false;
	}

	if($('#spwd').val() == ''){
		$('#spwd~b').text('请输入密码');
		//alert('请输入二级密码');
		return false;
	}else{
		$('#spwd~b').text('');
	}

	$('#myform').submit();

});
</script>
